<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>用户注册</title>
	<link rel="stylesheet" href="__HOME__/style/base.css" type="text/css">
	<link rel="stylesheet" href="__HOME__/style/global.css" type="text/css">
	<link rel="stylesheet" href="__HOME__/style/header.css" type="text/css">
	<link rel="stylesheet" href="__HOME__/style/login.css" type="text/css">
	<link rel="stylesheet" href="__HOME__/style/footer.css" type="text/css">
</head>
<body>
	<include file="Public/userheader" />
	
	<!-- 登录主体部分start -->
	<div class="login w990 bc mt10 regist">
		<div class="login_hd">
			<h2>用户注册</h2>
			<b></b>
		</div>
		<div class="login_bd">
			<div class="login_form fl">
				<form action="" method="post">
					<ul>
						<li>
							<label for="">用户名：</label>
							<input type="text" class="txt" name="username" />
							<p>3-20位字符，可由中文、字母、数字和下划线组成</p>
						</li>
						<li>
							<label for="">密码：</label>
							<input type="password" class="txt" name="password" />
							<p>6-20位字符，可使用字母、数字和符号的组合，不建议使用纯数字、纯字母、纯符号</p>
						</li>					
						<li>
							<label for="">手机号：</label>
							<input type="text" class="txt tel" name="tel" />
							<input type="button" name="" id="getCode" value="获取验证码">
						</li>
						<li>
							<label for="">验证码：</label>
							<input type="text" class="txt" name="code" />
						</li>
						<li>
							<label for="">&nbsp;</label>
							<input type="checkbox" class="chb" checked="checked" /> 我已阅读并同意《用户注册协议》
						</li>
						<li>
							<label for="">&nbsp;</label>
							<input type="submit" value="" class="login_btn" />
						</li>
					</ul>
				</form>

				
			</div>
			
			<div class="mobile fl">
				<h3>手机快速注册</h3>			
				<p>中国大陆手机用户，编辑短信 “<strong>XX</strong>”发送到：</p>
				<p><strong>1069099988</strong></p>
			</div>

		</div>
	</div>
	<!-- 登录主体部分end -->
	
	<include file="Public/copyright" />
</body>
</html>
<script type="text/javascript" src="__HOME__/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	$('#getCode').click(function(){
		//获取手机号
		var tel = $('.tel').val();
		$.ajax({
			url:'{:U("sendSms")}',
			data:{tel:tel},
			type:'post',
			success:function(res){
				if(res.status==0){
					alert(res.msg);
				}else{
					// 发送短信验证码成功
					getTime();
				}
			}
		}); 
	});
	var time = 10;//定义全局的时间
	var timer;//保存定时器
	function getTime(){
		time-=1;
		if(time>=1){
			$('#getCode').attr('disabled',true).val(time+'秒后再次获取');
			timer = setTimeout("getTime()",1000);
		}else{
			$('#getCode').attr('disabled',false).val('再次获取');
			time=10;//回归初始状态
			clearTimeout(timer);
		}
	}
</script>